<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <title>ActionDispatch::RailsEntityStore</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" />
<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script>
<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script>

</head>

<body>     
    <div class="banner">
        
            <span>Ruby on Rails v4.0.0</span><br />
        
        <h1>
            <span class="type">Class</span> 
            ActionDispatch::RailsEntityStore 
            
                <span class="parent">&lt; 
                    
                    Rack::Cache::EntityStore
                    
                </span>
            
        </h1>
        <ul class="files">
            
            <li><a href="../../files/actionpack/lib/action_dispatch/http/rack_cache_rb.html">actionpack/lib/action_dispatch/http/rack_cache.rb</a></li>
            
        </ul>
    </div>
    <div id="bodyContent">
        <div id="content">
  


  


  
  


  


  
    <!-- Method ref -->
    <div class="sectiontitle">Methods</div>
    <dl class="methods">
      
        <dt>E</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="RailsEntityStore.html#method-i-exist-3F">exist?</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>N</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="RailsEntityStore.html#method-c-new">new</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>O</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="RailsEntityStore.html#method-i-open">open</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>R</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="RailsEntityStore.html#method-i-read">read</a>,
              </li>
            
              
              <li>
                <a href="RailsEntityStore.html#method-c-resolve">resolve</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>W</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="RailsEntityStore.html#method-i-write">write</a>
              </li>
            
          </ul>
        </dd>
      
    </dl>
  

  



  

    

    

    
      <!-- Section constants -->
      <div class="sectiontitle">Constants</div>
      <table border='0' cellpadding='5'>
        
          <tr valign='top'>
            <td class="attr-name">RAILS</td>
            <td>=</td>
            <td class="attr-value">self</td>
          </tr>
          
            <tr valign='top'>
              <td>&nbsp;</td>
              <td colspan="2" class="attr-desc"></td>
            </tr>
          
        
      </table>
    


    


    <!-- Methods -->
    
      <div class="sectiontitle">Class Public methods</div>
      
        <div class="method">
          <div class="title method-title" id="method-c-new">
            
              <b>new</b>(store = Rails.cache)
            
            <a href="RailsEntityStore.html#method-c-new" name="method-c-new" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-c-new_source')" id="l_method-c-new_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/6f8159c4217dc8433a2027ced0c61e7ce94551d3/actionpack/lib/action_dispatch/http/rack_cache.rb#L35" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-c-new_source" class="dyn-source">
                <pre><span class="ruby-comment"># File actionpack/lib/action_dispatch/http/rack_cache.rb, line 35</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">initialize</span>(<span class="ruby-identifier">store</span> = <span class="ruby-constant">Rails</span>.<span class="ruby-identifier">cache</span>)
  <span class="ruby-ivar">@store</span> = <span class="ruby-identifier">store</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-c-resolve">
            
              <b>resolve</b>(uri)
            
            <a href="RailsEntityStore.html#method-c-resolve" name="method-c-resolve" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-c-resolve_source')" id="l_method-c-resolve_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/6f8159c4217dc8433a2027ced0c61e7ce94551d3/actionpack/lib/action_dispatch/http/rack_cache.rb#L31" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-c-resolve_source" class="dyn-source">
                <pre><span class="ruby-comment"># File actionpack/lib/action_dispatch/http/rack_cache.rb, line 31</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">resolve</span>(<span class="ruby-identifier">uri</span>)
  <span class="ruby-identifier">new</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
                  
      <div class="sectiontitle">Instance Public methods</div>
      
        <div class="method">
          <div class="title method-title" id="method-i-exist-3F">
            
              <b>exist?</b>(key)
            
            <a href="RailsEntityStore.html#method-i-exist-3F" name="method-i-exist-3F" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-exist-3F_source')" id="l_method-i-exist-3F_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/6f8159c4217dc8433a2027ced0c61e7ce94551d3/actionpack/lib/action_dispatch/http/rack_cache.rb#L39" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-exist-3F_source" class="dyn-source">
                <pre><span class="ruby-comment"># File actionpack/lib/action_dispatch/http/rack_cache.rb, line 39</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">exist?</span>(<span class="ruby-identifier">key</span>)
  <span class="ruby-ivar">@store</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">key</span>)
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-open">
            
              <b>open</b>(key)
            
            <a href="RailsEntityStore.html#method-i-open" name="method-i-open" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-open_source')" id="l_method-i-open_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/6f8159c4217dc8433a2027ced0c61e7ce94551d3/actionpack/lib/action_dispatch/http/rack_cache.rb#L43" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-open_source" class="dyn-source">
                <pre><span class="ruby-comment"># File actionpack/lib/action_dispatch/http/rack_cache.rb, line 43</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">open</span>(<span class="ruby-identifier">key</span>)
  <span class="ruby-ivar">@store</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">key</span>)
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-read">
            
              <b>read</b>(key)
            
            <a href="RailsEntityStore.html#method-i-read" name="method-i-read" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-read_source')" id="l_method-i-read_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/6f8159c4217dc8433a2027ced0c61e7ce94551d3/actionpack/lib/action_dispatch/http/rack_cache.rb#L47" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-read_source" class="dyn-source">
                <pre><span class="ruby-comment"># File actionpack/lib/action_dispatch/http/rack_cache.rb, line 47</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">read</span>(<span class="ruby-identifier">key</span>)
  <span class="ruby-identifier">body</span> = <span class="ruby-identifier">open</span>(<span class="ruby-identifier">key</span>)
  <span class="ruby-identifier">body</span>.<span class="ruby-identifier">join</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">body</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-write">
            
              <b>write</b>(body)
            
            <a href="RailsEntityStore.html#method-i-write" name="method-i-write" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-write_source')" id="l_method-i-write_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/6f8159c4217dc8433a2027ced0c61e7ce94551d3/actionpack/lib/action_dispatch/http/rack_cache.rb#L52" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-write_source" class="dyn-source">
                <pre><span class="ruby-comment"># File actionpack/lib/action_dispatch/http/rack_cache.rb, line 52</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">write</span>(<span class="ruby-identifier">body</span>)
  <span class="ruby-identifier">buf</span> = []
  <span class="ruby-identifier">key</span>, <span class="ruby-identifier">size</span> = <span class="ruby-identifier">slurp</span>(<span class="ruby-identifier">body</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">part</span><span class="ruby-operator">|</span> <span class="ruby-identifier">buf</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">part</span> }
  <span class="ruby-ivar">@store</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">key</span>, <span class="ruby-identifier">buf</span>)
  [<span class="ruby-identifier">key</span>, <span class="ruby-identifier">size</span>]
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
                    </div>

    </div>
  </body>
</html>    